package com.randi.file.entity.vo;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.web.multipart.MultipartFile;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * @author ziye
 */
@Data
@ApiModel(value = "FileChunkUpload对象", description = "文件分片上传")
public class FileSliceUploadVo {

    @NotBlank(message = "文件哈希不能为空")
    @ApiModelProperty("文件哈希")
    private String fileHash;

    @NotNull(message = "分片文件不能为空")
    @ApiModelProperty("分片文件")
    private MultipartFile chunkFile;

    @NotNull(message = "分片索引不能为空")
    @ApiModelProperty("分片索引")
    private Integer index;

    @NotNull(message = "起始索引不能为空")
    @ApiModelProperty("起始索引")
    private Long startIndex;

    @NotNull(message = "结束索引不能为空")
    @ApiModelProperty("结束索引")
    private Long endIndex;

}
